home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / jazlib.arc / JZREBOOT.ASM < prev    next >
Assembly Source File  |  1988-12-18  |  965b  |  35 lines

  1. Comment *
  2. ┌────────────────────────────────────────────────────────────────────────────┐
  3. │jzreboot.asm                                     │
  4. │Reboot an IBM PC or compatible.                         │
  5. │synopsis                                     │
  6. │   jzreboot(1) | jzreboot(0) where 1 means cold boot and 0 means warm boot  │
  7. │                                         │
  8. │ (C) JazSoft Software by Jack A. Zucker (301) 794-5950              │
  9. └────────────────────────────────────────────────────────────────────────────┘
  10. *
  11. bios    segment at 0f000h
  12.     org 0fff0h
  13. reset    label    far
  14. bios ends
  15.  
  16.     assume cs:_text
  17. _text    segment public byte 'code'
  18.     public _jzreboot
  19.  
  20. _jzreboot proc near
  21.     mov bp,sp        ; don't need to save registers here !!!!!
  22.     mov ax,[bp+2]        ; get boot type
  23.     cmp ax,1        ; cold boot request?
  24.     jz _jzreboot1
  25.     mov ax,40h        ; setting location 0x40:0x72 = 1234h
  26.     mov si,72h        ; makes bios thing that ctrl-alt-delete was
  27.     mov ds,ax        ; pressed !!!!
  28.     mov [si],1234h
  29. _jzreboot1:
  30.     assume cs:bios
  31.     jmp reset
  32. _jzreboot    endp
  33. _text    ends
  34. end
  35.